package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.ScenarioBusinessComponentGroupMapper;
import com.ruoyi.business.domain.ScenarioBusinessComponentGroup;
import com.ruoyi.business.service.IScenarioBusinessComponentGroupService;

/**
 * 场景业务组件分组Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-02
 */
@Service
public class ScenarioBusinessComponentGroupServiceImpl implements IScenarioBusinessComponentGroupService 
{
    @Autowired
    private ScenarioBusinessComponentGroupMapper scenarioBusinessComponentGroupMapper;

    /**
     * 查询场景业务组件分组
     * 
     * @param id 场景业务组件分组主键
     * @return 场景业务组件分组
     */
    @Override
    public ScenarioBusinessComponentGroup selectScenarioBusinessComponentGroupById(Long id)
    {
        return scenarioBusinessComponentGroupMapper.selectScenarioBusinessComponentGroupById(id);
    }

    /**
     * 查询场景业务组件分组列表
     * 
     * @param scenarioBusinessComponentGroup 场景业务组件分组
     * @return 场景业务组件分组
     */
    @Override
    public List<ScenarioBusinessComponentGroup> selectScenarioBusinessComponentGroupList(ScenarioBusinessComponentGroup scenarioBusinessComponentGroup)
    {
        return scenarioBusinessComponentGroupMapper.selectScenarioBusinessComponentGroupList(scenarioBusinessComponentGroup);
    }

    /**
     * 新增场景业务组件分组
     * 
     * @param scenarioBusinessComponentGroup 场景业务组件分组
     * @return 结果
     */
    @Override
    public int insertScenarioBusinessComponentGroup(ScenarioBusinessComponentGroup scenarioBusinessComponentGroup)
    {
        scenarioBusinessComponentGroup.setCreateTime(DateUtils.getNowDate());
        return scenarioBusinessComponentGroupMapper.insertScenarioBusinessComponentGroup(scenarioBusinessComponentGroup);
    }

    /**
     * 修改场景业务组件分组
     * 
     * @param scenarioBusinessComponentGroup 场景业务组件分组
     * @return 结果
     */
    @Override
    public int updateScenarioBusinessComponentGroup(ScenarioBusinessComponentGroup scenarioBusinessComponentGroup)
    {
        scenarioBusinessComponentGroup.setUpdateTime(DateUtils.getNowDate());
        return scenarioBusinessComponentGroupMapper.updateScenarioBusinessComponentGroup(scenarioBusinessComponentGroup);
    }

    /**
     * 批量删除场景业务组件分组
     * 
     * @param ids 需要删除的场景业务组件分组主键
     * @return 结果
     */
    @Override
    public int deleteScenarioBusinessComponentGroupByIds(Long[] ids)
    {
        return scenarioBusinessComponentGroupMapper.deleteScenarioBusinessComponentGroupByIds(ids);
    }

    /**
     * 删除场景业务组件分组信息
     * 
     * @param id 场景业务组件分组主键
     * @return 结果
     */
    @Override
    public int deleteScenarioBusinessComponentGroupById(Long id)
    {
        return scenarioBusinessComponentGroupMapper.deleteScenarioBusinessComponentGroupById(id);
    }
}
